package com.sff.site.events {
	import flash.events.EventDispatcher;
	import flash.events.IEventDispatcher;	

	public class FlowEventDispatcher extends EventDispatcher {

		public function FlowEventDispatcher(target : IEventDispatcher = null) {
			super( target );
		}
		
		
		override public function addEventListener(type : String, listener : Function, useCapture : Boolean = false, priority : int = 0, useWeakReference : Boolean = false) : void {
			if( useCapture ) type = CAPTURE_PREFIX + type;
			super.addEventListener( type , listener , false , priority , useWeakReference );
		}

		override public function removeEventListener(type : String, listener : Function, useCapture : Boolean = false ) : void {
			if( useCapture ) type = CAPTURE_PREFIX + type;
			super.removeEventListener( type , listener , false  );
		}
		
		internal static const CAPTURE_PREFIX : String = "_ucf_";
		
	}
}
